#ifndef THREAD_H
#define THREAD_H

#include <pthread.h>
#include <functional>

class Thread {
public:
    typedef std::function<void()> ThreadFunction;

    Thread(ThreadFunction threadFunc);
    ~Thread();

    void start();
    void join();


private:

    static void* startThread(void*);

    pthread_t tid_;
    ThreadFunction threadFunction_;


};

#endif